package com.qd.hik.dto.charge;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.qd.common.panda.util.PlateColorUtil;
import lombok.Data;
import lombok.experimental.Accessors;

/**
 * @author sjk
 */
@Data
@Accessors(chain = true)
public class HkArrearsRecordsResp {
    /**
     * 停车场编号
     */
    private String parkCode;
    /**
     * 停车场名称
     */
    private String parkName;
    /**
     * 车牌号码
     */
    private String plateNo;
    /**
     * 车牌颜色
     */
    private Integer plateColor;
    /**
     * 账单总额
     */
    private Integer totalFee;
    /**
     * 欠费金额
     */
    private Integer arrearsFee;
    /**
     * 欠费时间
     */
    private Long arrearsTime;
    /**
     * 停车开始时间
     */
    private Long inTime;
    /**
     * 停车结束时间
     */
    private Long outTime;
    /**
     * 停车时长
     */
    private Long parkPeriodTime;
    /**
     * 泊位编号
     */
    private String berthCode;
    /**
     * 账单编号
     */
    private String billCode;
    /**
     * 入场唯一ID
     */
    @JsonProperty("inUnid")
    private String inUnid;

    public Integer getPlateColor() {
        if(null !=plateColor){
            plateColor = PlateColorUtil.hkToPanda(plateColor);
        }
        return plateColor;
    }
    public void freeData() {
        this.parkCode = null;
        this.parkName = null;
        this.plateNo = null;
        this.plateColor = null;
        this.totalFee = null;
        this.arrearsFee = null;
        this.arrearsTime = null;
        this.inTime = null;
        this.outTime = null;
        this.parkPeriodTime = null;
        this.berthCode = null;
        this.billCode = null;
        this.inUnid = null;
    }

}
